<template>
    <div id="app">
        <!-- 只留下默认的路由出口 -->
        <!-- 组件也可以写成但标签的方式-->
        <van-button plain type="info">朴素按钮</van-button>
        <!-- 1. 单个日期选择的日历 -->
        <van-count-down
            ref="countDown"
            millisecond
            :time="3000"
            :auto-start="false"
            format="ss:SSS"
            @finish="finish"
        />
        <van-grid clickable>
            <van-grid-item text="开始" icon="play-circle-o" @click="start" />
            <van-grid-item text="暂停" icon="pause-circle-o" @click="pause" />
            <van-grid-item text="重置" icon="replay" @click="reset" />
        </van-grid>
    </div>
</template>
<script>
// import dayjs from 'dayjs'
export default {
    data() {
        return {
            date: '',
            show: false,
            value: 50,
            checked: false
        }
    },
    methods: {
        start() {
            this.$refs.countDown.start()
        },
        pause() {
            this.$refs.countDown.pause()
        },
        reset() {
            this.$refs.countDown.reset()
        },
        finish() {
            Toast('倒计时结束')
        }
    }
}
</script>
